package com.lagshixiaobai.config;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(200, "成功"),
    UNKNOWN_ERROR(500, "unknown error"),

    CLIENT_ERROR(400, "Client端错误"),
    CLIENT_PARAM_ERROR(410, "Client请求参数错误"),
    NOT_FOUND(450, "资源不存在(或已删除)"),

    OPERATE_FAIL(3001, "操作失败"),
    ID_CARD_ERROR(40002, "身份信息不匹配"),
    GRAPHIC_CODE(40003, "验证码已发送"),
    PARAM_ERROR(4001, "参数错误"),
    GRAPHIC_CODE_ERROR(4006, "修改失败，验证码信息不匹配"),
    ROLE_NAME_EXIST(4005, "角色名称已存在"),

    DUPLICATE_REGISTER(4002, "请勿重复操作"),

    CODE_NOT_EXIST(4008, "验证码不存在"),
    CODE_EXPIRE(4009, "验证码过期"),
    CODE_VALID_TIMES_LIMIT(40010, "验证限制"),
    CODE_SEND_TIMES_LIMIT(40012, "发送限制"),
    CODE_VALID_FAIL(40011, "验证失败"),
    PHONE_CODE_VALID_FAIL(40014, "手机号格式不正确"),

    RENEW_RULE_IS_EMPTY(40016, "续费规则没有配置"),
    PHONE_CODE_IS_EMPTY(40013, "手机号不能为空");

    // 错误码 只有200表示成功
    private final int code;
    private final String message;
}
